package net.beyondts.example.mplug.extension;

import org.apache.commons.lang3.reflect.MethodUtils;
import org.springframework.beans.factory.annotation.Autowired;

import java.lang.reflect.InvocationTargetException;

/**
 * Created by zhaocw on 2019-1-18.
 *
 * @author zhaocw
 */
public class Base {
    @Autowired
    protected Base self;

    protected Object invokeSelf(String methodName, Object... args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
        return MethodUtils.invokeMethod(self, true, methodName, args);
    }
}
